<?php

namespace app\api\Logic;


use app\api\model\ManystoreShopModel;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\DbException;

class ManystoreShopLogic
{
    /**
     * 校区详情
     * @param $shopId
     * @return array
     * @throws DataNotFoundException
     * @throws ModelNotFoundException
     * @throws DbException
     */
    public function shopInfo($shopId){
        $info = ManystoreShopModel::where('id',$shopId)
            ->field('id,name,logo,image,brand_id')
            ->find();

        return objToArray($info) ?? [];
    }
}
